function HuZhiShu(a,b)
	y=1
	if(a>b) then 
		x=b
	else
		x=a
	end
	for i=2,x do
		if(a%i==0 and b%i==0) then
			y=0
			break
		end
	end
   return y
end

print('HuZhuShu a=?')
a=io.read()
print('b=?')
b=io.read()
y=HuZhiShu(a,b)
if(y==1) then
	print('Yes')
else
	print('NO')
end
